# -*- coding: utf-8 -*-

# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html


class ArxivPipeline(object):
	
    def __init__(self):  
        try:  
            self.db = MySQLdb.connect(host="127.0.0.1", user="root", passwd="1234", port=3306, db="html_url",  charset="utf8")  
            self.cursor = self.db.cursor()  
            print "Connect to db successfully!"  

        except:  
            print "Fail to connect to db!" 
    def process_item(self, item, spider):
        return item
